package com.danciyixue.boot.dcyx.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 单元测试记录表单对象
 *
 * @author youlaitech
 * @since 2025-06-15 16:33
 */
@Getter
@Setter
@Schema(description = "单元测试记录表单对象")
public class UnitTestRecordsForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "测试记录ID")
    private Long id;

    @Schema(description = "用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @Schema(description = "单元ID")
    @NotNull(message = "单元ID不能为空")
    private Long unitId;

    @Schema(description = "单元名称")
    @NotBlank(message = "单元名称不能为空")
    @Size(max=128, message="单元名称长度不能超过128个字符")
    private String name;

    @Schema(description = "闯关分数")
    @NotNull(message = "闯关分数不能为空")
    private Integer score;

    @Schema(description = "闯关时间,单位秒")
    @NotNull(message = "闯关时间,单位秒不能为空")
    private Integer timeSpent;

    @Schema(description = "是否完成,0未完成1完成")
    @NotNull(message = "是否完成,0未完成1完成不能为空")
    private Integer isEnd;


}
